<script lang='ts' setup>
import { reactive,onMounted,ref} from 'vue'

const state = reactive({
	dialogTitle: '',
	express: '',
	applySend: 12,
	doneSend: 69,
	returnGoods: 54,
	residue: 874,
	sendMethods: [
		{label: '自送', value: 1},
		{label: '快递', value: 2},
	],
	expressCompany: [
		{label: '顺丰', value: 1},
		{label: '百事', value: 2},
		{label: '京东', value: 3},
		{label: '圆通', value: 4},
		{label: '德邦', value: 5},
		{label: '中通', value: 6},
		{label: '圆通', value: 7},
		{label: '申通', value: 8},
	],
	sendPeple: '',
	phone: '',
	remark: '',
	methods: 1,
    tableData: [
		{
			id: 1, 
			name: '测试',
			six: '女',
			spec: '规格',
			phone: '15502336548',
			level: '2',
			totalPrice: '2562',
			consumePrice: '256',
			registerTime: '2023-02-25 12:12:36',
			staff: '1554562312',
			consumeStore: '雁塔店',
			buyTime: '2023-02-25 12:12:36',
			warranty: '',
			warrantyList: [
				{label: '保质期：2025-08-26 | 库存：100', value: '1'}
			],
			count: 1
		}
	] as Array<any>,
    rowId: 0
})
const innerVisible = ref(false)

const props = withDefaults(defineProps<{
    id: number,
    modelValue: boolean,
    statistics: number
	status: number
}>(), {
    statistics: 1,
	title: '',
	status: 1
})

const emit = defineEmits(['update:modelValue'])

const closeDialog = () => {
    emit('update:modelValue', false)
}

const previewInfo = (row: any) => {
    state.rowId = row.id 
	innerVisible.value = true
	state.dialogTitle = row.name || ''
}


</script>

<template>
    <main>
        <el-dialog v-model="props.modelValue" :title="`发货信息`" @close="closeDialog" style="width: 1300px;" center>
            <section>
				<section class="mb20">
					<h3 class="color-primary mb10">发货方式</h3>
					<p>发货方式：自送</p>
				</section>
				<section class="mb20">
					<h3 class="color-primary mb10">发货信息</h3>
					<p>送货人：-</p>
				</section>
				<section class="mb20">
					<h3 class="color-primary mb10">发货信息</h3>
					<el-table :data="state.tableData" style="width: 100%" class="mb20" border> 
						<el-table-column label="品牌" prop="cellPrice" />
						<el-table-column label="类型" prop="cellPrice" />
						<el-table-column label="商品名称" prop="orderPrice" />
						<el-table-column label="规格" prop="buyCount" />
						<el-table-column label="条形码" prop="buyCount"  />
						<el-table-column label="实发数量" prop="totalPrice"  />
						
					</el-table>
				</section>
				<section class="mb20">
					<h3 class="color-primary mb10">备注</h3>
					<p class="mb5">要货备注：-</p>
					<p class="mb5">发货备注：-</p>
				</section>
				
				<section style="text-align: center;">
					<el-button type="primary" @click="closeDialog">确定</el-button>
				</section>
			</section>
        </el-dialog>
		<InnerDialog :id="state.rowId" v-model="innerVisible" :title="state.dialogTitle" />
    </main>
</template>

<style lang='scss' scoped>

</style>